<head>
	<meta charset="utf-8">
	<title>通过微信支付的银行卡提现</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">

	<!--标准mui.css-->
	<link rel="stylesheet" href="css/mui.min.css">
	<!--App自定义的css-->
	<link rel="stylesheet" type="text/css" href="css/app.css" />
	<style>
		body,
		html {
			overflow-x: hidden;
		}
		
		html,
		body {
			height: 100%;
		}
		
		.mui-select:before {
			content: '\e563';
		}
		
		.inwrap {
			text-align: center;
		}
	</style>
</head>

<body>
	<header class="mui-bar mui-bar-nav">
		<h1 class="mui-title">银行卡提现</h1>
	</header>
	<div class="mui-content">
		<div class="mui-content-padded">
			<div>
				<div class="mui-input-row">
					<input id="realName" type="text" class="mui-input-clear" placeholder="请输入姓名">
				</div>
				<div class="mui-input-row mui-select">
					<label>请选择银行</label>
					<select id="bankList">
					</select>
				</div>
				<div class="mui-input-row">
					<input id="bankNum" type="text" class="mui-input-clear" placeholder="请输入银行卡号">
				</div>
				<div class="mui-input-row">
					<input id="withdraw" type="text" class="mui-input-clear" placeholder="请输入提现金额">
				</div>
				<textarea id="desc" rows="5" placeholder="提现备注"></textarea>
			</div>
			<p class="inwrap" style="word-break:none;overflow:hidden; font-size: 15px; font-family: 'microsoft yahei'">提现代表同意
				<a href="userAgreement.html">提现规则</a>
			</p>

			<button onclick="withdraw()" type="button" style="font-size: 15px; font-family: 'microsoft yahei';text-align: center;" class="mui-btn mui-btn-success mui-btn-block">确认提现</button>
		</div>
	</div>
	<script src="js/mui.min.js"></script>
	<script type="text/javascript" src="js/common.js"></script>
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/layer/3.0.1/layer.min.js"></script>
	<script>
		$(function() {
			getBankList();
		});

		function getBankList() {
			Common.ajaxNoParamGet("/fenful/api/v1/common/getWechatBankList", function(res) {
				for(var i = 0; i < res.length; i++) {
					$("#bankList").append("<option value='" + res[i].bank_code + "'>" + res[i].bank_name + "</option>");
				}
			});

		}

		function withdraw() {

			var bankCode = $("#bankList option:selected").val();
			if(bankCode == 0) {
				mui.alert("请选择银行!");
			}
			var realName = $("#realName").val();
			var bankCode = $("#bankList option:selected").val();
			var bankNum = $("#bankNum").val();
			var withdraw = $("#withdraw").val();
			var desc = $("#desc").val();

			Common.isEmpty(realName,"请输入真实姓名");
			Common.isEmpty(bankCode,"请选择银行");
			Common.isEmpty(bankNum,"请输入银行卡号");
			Common.isEmpty(withdraw,"请输入提现金额");
			Common.isEmpty(desc,"请输入提现备注");

			var paramStr = {};
			paramStr.realName = realName;
			paramStr.bankCode = bankCode;
			paramStr.bankNum = bankNum;
			paramStr.withdraw = withdraw;
			paramStr.desc = desc;

			var params = {};
			params.paramStr = JSON.stringify(paramStr);

		}
	</script>
</body>